<template>
  <el-card>
    <el-table :data="roleList" border   row-key="id" :expand-row-keys="['1']">
      <el-table-column label="名称" prop="name" width="180"/>
      <el-table-column label="权限值" prop="code" />
      <el-table-column label="跳转权限值" prop="toCode" />
      <el-table-column label="操作" width="180">
        <template v-slot="{ row }">
          <el-button size="small" type="primary" :icon="User" />
          <el-button size="small" type="warning" :icon="Edit" />
          <el-button size="small" type="danger" :icon="Delete" />
        </template>
      </el-table-column>
    </el-table>
 </el-card>
</template>

<script lang="ts">
export default {
  name: "permission",
};
</script>

<script lang="ts" setup>
import { Search, User, Edit, Delete } from "@element-plus/icons-vue";
import {ref,onMounted} from 'vue'
import {getPermissionListApi} from "@/api/acl/permission"
import type { getRolePermissionListResponse } from "@/api/acl/model/permissionModel";
 
const roleList=ref<any>([])
  const goRoleAuth=()=>{}

onMounted(async()=>{
 const res= await  getPermissionListApi()
 roleList.value=res.children
})
</script>

<style scoped></style>